package inventario.grafica;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

import com.cloudgarden.resource.SWTResourceManager;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class CriarEquipamento extends org.eclipse.swt.widgets.Composite {
	private Text cadastrarEquipamento;
	private Text text1;
	private Button voltar;
	private Button ok;
	private Text text2;
	private Text nomeEquipamento;
	private Text novoEquipamento;

	{
		//Register as a resource user - SWTResourceManager will
		//handle the obtaining and disposing of resources
		SWTResourceManager.registerResourceUser(this);
	}

	public CriarEquipamento(Composite parent, int style) {
		super(parent, style);
		initGUI();
	}
	
	/**
	* Initializes the GUI.
	*/
	private void initGUI() {
		try {
			this.setSize(612, 461);
			this.setBackground(SWTResourceManager.getColor(172, 203, 158));
			FormLayout thisLayout = new FormLayout();
			this.setLayout(thisLayout);
			{
				FormData nomeEquipamentoLData = new FormData();
				nomeEquipamentoLData.left =  new FormAttachment(0, 1000, 189);
				nomeEquipamentoLData.top =  new FormAttachment(0, 1000, 138);
				nomeEquipamentoLData.width = 286;
				nomeEquipamentoLData.height = 20;
				nomeEquipamento = new Text(this, SWT.MULTI | SWT.WRAP);
				nomeEquipamento.setLayoutData(nomeEquipamentoLData);
			}
			{
				cadastrarEquipamento = new Text(this, SWT.NONE);
				cadastrarEquipamento.setText("Cadastrar Equipamento");
				FormData cadastrarEquipamentoLData = new FormData();
				cadastrarEquipamentoLData.left =  new FormAttachment(0, 1000, 77);
				cadastrarEquipamentoLData.top =  new FormAttachment(0, 1000, 45);
				cadastrarEquipamentoLData.width = 172;
				cadastrarEquipamentoLData.height = 24;
				cadastrarEquipamento.setLayoutData(cadastrarEquipamentoLData);
				cadastrarEquipamento.setFont(SWTResourceManager.getFont("Segoe UI Semibold",12,0,false,false));
				cadastrarEquipamento.setBackground(SWTResourceManager.getColor(172,203,158));
			}
			{
				novoEquipamento = new Text(this, SWT.NONE);
				novoEquipamento.setText("Novo Equipamento");
				novoEquipamento.setFont(SWTResourceManager.getFont("Segoe UI",10,0,false,false));
				FormData novoEquipamentoLData = new FormData();
				novoEquipamentoLData.left =  new FormAttachment(0, 1000, 131);
				novoEquipamentoLData.top =  new FormAttachment(0, 1000, 93);
				novoEquipamentoLData.width = 120;
				novoEquipamentoLData.height = 20;
				novoEquipamento.setLayoutData(novoEquipamentoLData);
				novoEquipamento.setEditable(false);
				novoEquipamento.setBackground(SWTResourceManager.getColor(172,203,158));
				novoEquipamento.setEnabled(false);
			}
			{
				text1 = new Text(this, SWT.NONE);
				text1.setText("Nome");
				text1.setFont(SWTResourceManager.getFont("Segoe UI Semibold", 10, 0, false, false));
				FormData text1LData = new FormData();
				text1LData.left =  new FormAttachment(0, 1000, 126);
				text1LData.top =  new FormAttachment(0, 1000, 138);
				text1LData.width = 44;
				text1LData.height = 20;
				text1.setLayoutData(text1LData);
				text1.setEditable(false);
				text1.setBackground(SWTResourceManager.getColor(172,203,158));
				text1.setEnabled(false);
			}
			{
				text2 = new Text(this, SWT.NONE);
				text2.setText("Atributos");
				text2.setFont(SWTResourceManager.getFont("Segoe UI Semibold",10,0,false,false));
				FormData text2LData = new FormData();
				text2LData.left =  new FormAttachment(0, 1000, 107);
				text2LData.top =  new FormAttachment(0, 1000, 177);
				text2LData.width = 58;
				text2LData.height = 20;
				text2.setLayoutData(text2LData);
				text2.setEditable(false);
				text2.setBackground(SWTResourceManager.getColor(172,203,158));
				text2.setEnabled(false);
			}
			{
				ok = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData okLData = new FormData();
				okLData.left =  new FormAttachment(0, 1000, 323);
				okLData.top =  new FormAttachment(0, 1000, 414);
				okLData.width = 72;
				okLData.height = 25;
				ok.setLayoutData(okLData);
				ok.setText("Cadastrar");
				ok.setBackground(SWTResourceManager.getColor(172,203,158));
			}
			{
				voltar = new Button(this, SWT.PUSH | SWT.CENTER);
				voltar.setText("Voltar");
				FormData voltarLData = new FormData();
				voltarLData.width = 50;
				voltarLData.height = 25;
				voltarLData.left =  new FormAttachment(0, 1000, 237);
				voltarLData.top =  new FormAttachment(0, 1000, 414);
				voltar.setLayoutData(voltarLData);
				voltar.setBackground(SWTResourceManager.getColor(172,203,158));
			}
			this.layout();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	/**
	* Auto-generated main method to display this 
	* org.eclipse.swt.widgets.Composite inside a new Shell.
	*/
	public static void main(String[] args) {
		Display display = Display.getDefault();
		Shell shell = new Shell(display);
		CriarEquipamento inst = new CriarEquipamento(shell, SWT.NULL);
		Point size = inst.getSize();
		shell.setLayout(new FillLayout());
		shell.layout();
		if(size.x == 0 && size.y == 0) {
			inst.pack();
			shell.pack();
		} else {
			Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);
			shell.setSize(shellBounds.width, shellBounds.height);
		}
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
	}

}
